<script lang="ts" setup>
import type { EvaluationType, PhaseType } from '@/types/micro-scene';
import SubTitle from './components/SubTitle.vue';
import { onMounted, ref } from 'vue';
import { getPhaseInfo } from '@/api/MicroScene/MicroSceneDetailApi';
import { useRoute } from 'vue-router';
const props = defineProps<{
  phaseId: string
}>()
const evaluation = ref<EvaluationType>({
  totalScore: 0,
  gainedScore: 0,
});
const route = useRoute()
const getText = async () => {
  const response = await getPhaseInfo(route.params.id as string, props.phaseId)
  evaluation.value.totalScore = response.phaseScore
  evaluation.value.gainedScore = 0
}
onMounted(() => {
  getText();
})
</script>

<template>
  <SubTitle title="阶段权重" />
  <div class="text-[0.875rem] mt-4 leading-6">
    该阶段总分数：{{ evaluation.totalScore }} 分
    （此分数由具体任务分数和阶段作品分数自动计算得出）
  </div>
  <div class="text-[0.875rem] mb-4 leading-6">
    已获得 {{ evaluation.gainedScore }} 分
  </div>
</template>

<style lang="scss" scoped>

</style>
